old_protocol = "8" # Backward compat. with old numbering scheme.
old_script = "8120"
</header>
<description>
≤GB≥Hypertext Transfer Protocol (HTTP) - Proxy≤P≥
The protocol used to transfer web pages on the World Wide Web, defined in ≤U2≥RFC 2068≤P0≥ and ≤U2≥RFC 1945≤P0≥. The default TCP port number for HTTP connections is port 80.
This TCP probe lets you test that a web server can be accessed using a remote proxy server as an intermediary. For example, this probe can check if your web server is accessible from some remote location on the Internet (e.g. www.proxymate.com).
≤i≥URL≤p≥ is the full URL to the desired page on the web server,including the “http://” scheme (e.g. “http://www.intermapper.com”)
≤i≥Proxy User ID≤p≥ is your user ID for the proxy server. Leave this field blank if no authentication is required to use the proxy server.
≤i≥Proxy Password≤p≥ is your password for the proxy server. Leave this field blank if no authentication is required to use the proxy server.
≤i≥String to verify≤p≥ is a string to verify in the data returned by the HTTP server. For example, if you are retrieving a web page, you might search for “<HTML>” or “<P>” to verify that the data is HTML.
≤i≥User Agent≤p≥ is the string that identifies this InterMapper client probe to the proxy web server. Some proxy servers block traffic at the proxy based on the User-Agent identity. This parameter lets you optionally override InterMapper's default User-Agent setting. If you leave this parameter blank, InterMapper sends a User-Agent string of “InterMapper/version”, where version is the current version number of InterMapper.
</description>
<parameters>
"URL" = "http://www.intermapper.com"
"Proxy User ID" = ""
"Proxy Password" = ""
"String to verify" = "<HTML>"
"User Agent" = ""
</parameters>
<script>
CONN #60 (connect timeout in secs)
WAIT #30 @IDLE (idle timeout in secs)
DISC @DISCONNECT
SEND "GET ${URL} HTTP/1.0\r\n"
CHCK "${User Agent}" else #+3
SEND "User-Agent: ${User Agent}\r\n"
GOTO #+2
SEND "User-Agent: InterMapper/${_VERSION}\r\n"
CHCK "${Proxy User ID}${Proxy Password}" else goto #+2
SEND "Proxy-Authorization: Basic ${_BASE64:${Proxy User ID}:${Proxy Password}}\r\n"
SEND "Cache-Control: no-cache\r\n"
SEND "Pragma: no-cache\r\n"
SEND "\r\n"
MTCH "HTTP/"i else goto @UNEXPECTED_GREETING
MTCH "200" else goto @UNAVAIL_GET_RESPONSE
LINE OFF
DISC if disconnected goto @NO_MATCH (added line in 2.1.1b1)
EXPT "${String to verify}"i else goto @NO_MATCH
DONE OKAY
@IDLE:
DONE DOWN "[HTTP (PROXY)] No data for ${_IDLETIMEOUT} seconds. Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
@UNEXPECTED_GREETING:
DONE DOWN "[HTTP (PROXY)] Unexpected greeting from port ${_REMOTEPORT}. (${_LINE:50})"
@NO_MATCH:
DONE WARN "[HTTP (PROXY)] \"${String to verify}\" not found in returned HTTP data."
@UNAVAIL_GET_RESPONSE:
MTCH m"50[0-9]" else goto @BAD_GET_RESPONSE
DONE DOWN "[HTTP (ROXY)] ${_LINE:50} (${URL})"
@BAD_GET_RESPONSE:
MTCH "201" ELSE #+2
DONE WARN "[HTTP (PROXY)] 201 Created (${URL})"
MTCH "202" ELSE #+2
DONE WARN "[HTTP (PROXY)] 202 Accepted (${URL})"
MTCH "204" ELSE #+2
DONE WARN "[HTTP (PROXY)] 204 No Content (${URL})"
MTCH "301" ELSE #+2
DONE WARN "[HTTP (PROXY)] 301 Moved Permanently (${URL})"
MTCH "302" ELSE #+2
DONE WARN "[HTTP (PROXY)] 302 Moved Temporarily (${URL})"
MTCH "304" ELSE #+2
DONE WARN "[HTTP (PROXY)] 304 Not Modified (${URL})"
MTCH "400" ELSE #+2
DONE WARN "[HTTP (PROXY)] 400 Bad Request (${URL})"